package pub.tbc.hh.mall.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
import pub.tbc.hh.mall.service.WaresService;

import java.util.Map;

/**
 * @auth tbc on 2018/5/20.
 */
@RestController
public class WaresController {
    @Autowired
    private WaresService waresService;

    @GetMapping("wares/{typeId}")
    public Map<String, Object> waresByTypeId(@PathVariable long typeId) {
        return waresService.queryWaresByType(typeId);
    }

}
